<template>
    <div class="info">
        <P> 账户信息 ：{{$store.state.user.info.profile.account}}</P>
        <P> 修改密码：
            <span @click="type=true" style="color:skyblue;">
                password
                </span>
             </P>
        <P> 名字：{{$store.state.user.info.profile.name}}</P>
        <P> 生日：{{$store.state.user.info.profile.birthday}}</P>
        <P> 性别：{{$store.state.user.info.profile.sex==1?'男':'女'}}</P>
        <P> 邮箱：{{$store.state.user.info.profile.email}}</P>
        <P> 电话：{{$store.state.user.info.profile.phone}}</P>
        <P> 部门：{{$store.state.user.info.profile.dept}}</P>    
        <p> 
            <el-button type="danger" @click="clearuser">退出登录</el-button>
         </p>
     <setpass :type='type' :btn='btn'></setpass>
    </div>
</template> 
<script>
import setpass from './setpass.vue'
export default  {
    data() {
        return {
            type:false
        }
    },
    components:{
        setpass,
    },
    methods: {
         btn(){
          //关闭对话框的改变状态 
          this.type=false;
        },
        clearuser(){
     //退出登录
       localStorage.clear()

      location.href='./login.html'
        }
       
    },
}
</script>
<style>

.info>p{
    line-height:50px;
}
</style>